{% extends "base.html" %}
{% block content %}

<div class="alert alert-primary" style="text-align: center;font-size: 22px; color: white;">
    Estimating ~<b>{{report.estimate_hour}}</b> analysis per hour, <b>{{report.estimate_day}}</b> per day.
</div>

<div class="row">
    <div class="col-md-6">
        <div class="jumbotron" style="text-align: center;">
            <h1>{{report.total_tasks}}</h1>
            Total tasks
        </div>
    </div>
    <div class="col-md-6">
        <div class="jumbotron" style="text-align: center;">
            <h1>{{report.total_samples}}</h1>
            Total samples
        </div>
    </div>
</div>

{% if report.top_detections %}
    <table class="table table-striped table-bordered table-sm">
        {% for block in report.top_detections %}
        <td style="text-align:center">
            <a href="/analysis/search/detections:{{block.family}}">{{block.total}}: <span style="color:#EE1B2F;font-weight: bold;">{{block.family}}</span></a>
        </td>

        {% if forloop.counter|divisibleby:"5" %}
        </tr>
        {% elif forloop.last %}
        </tr>
        {% endif %}
        {% endfor %}
    </table>
{% endif %}

<div class="table ">
    <table class="table table-striped table-dark table-hover" style="table-layout: fixed;">
        <thead>
        <tr>
            <th>State</th>
            <th>Count</th>
        </tr>
        </thead>
        <tbody>
        {% for state, count in report.states_count.items %}
            <tr>
                <td>{{state}}</td>
                <td>{{count}}</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
{% endblock %}
